<script type="text/javascript">
    $(function(){
        $("#userSetting").button();
    });
</script>
<table cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td colspan="2">
            <a href="#"><h2 style="margin: 0"> <?php echo $user->getFullname(); ?> </h2></a>
        </td>
        <td rowspan="4" valign="top" style=" border-top:1px solid white; width: 100px; padding:0;"  align="center">
            <img style="background: whitesmoke;box-shadow: 0 2px 2px silver; "src="<?php echo url_for('entityImage/index?entityid='.$user->getId().'?>') ?>" width="100" alt="<?php echo $user->getFullname(); ?>"/>
        </td>
    </tr>

    <tr>
        <td align="right">
            <img src="/images/collaboration.png" width="24px"/> 
        </td>
        <td align="left">
            <?php echo Researchgroup::getUserCollaborationListCount($user->getId(), Types::$COLLABORATION_REQUEST_STATUS[Types::$COLLABORATION_REQUEST_STATUS_APPROVED]).' collaboration'; ?>
        </td>
    </tr>
    <tr>
        <td align="right">
            <img src="/images/contribution.png" width="24px"/> 
        </td>
        <td align="left">
            <?php echo Research::getResearchCount($user->getId()).' contributions'; ?>
        </td>
    </tr>
    <tr>
        <td align="right">
            <img src="/images/reviewed.png" width="24px"/> 
        </td>
        <td >
            <?php echo Research::getResearchCountByScope($user->getId(), Types::$RESEARCH_SCOPE[Types::$RESEARCH_SCOPE_PUBLIC]).' reviewed'; ?>
        </td>
    </tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
            <?php 
                $institute =  $user->getUniversity();
                $position = $user->getPosition();
            ?>
            <?php if( !empty ( $institute ) && !empty ( $position ) ): ?>
            <span><?php echo $position.' @ '.$institute; ?></span>
            <?php endif; ?>
        </td>
    </tr>
</table>